﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Gx.Model.Entity
{
    [Table("LK_Incidentals")] 
    public class LKIncidentals
    {
        [Key]
        private int _id;
        /// <summary>
        /// Id
        /// </summary>
        [Column("Id")]
        public int Id 
        {
            get
            {
                return _id;
            }
            set { _id = value; }
        }
        
        
        private int _contractId;
        /// <summary>
        /// 零仓合同id
        /// </summary>
        [Column("ContractId")]
        public int ContractId 
        {
            get
            {
                return _contractId;
            }
            set { _contractId = value; }
        }

        private string _contractNo;
        /// <summary>
        /// 合同编号
        /// </summary>
        [Column("ContractNo")]
        public string ContractNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_contractNo))
                    _contractNo = string.Empty;
                return _contractNo;
            }
            set { _contractNo = value; }
        }

        private int _costTypeId;
        /// <summary>
        /// 费用类别id;
        /// </summary>
        [Column("CostTypeId")]
        public int CostTypeId
        {
            get
            {
                return _costTypeId;
            }
            set { _costTypeId = value; }
        }


        private string _costType;
        /// <summary>
        /// 费用类别
        /// </summary>
        [Column("CostType")]
        public string CostType 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_costType))
                    _costType=string.Empty;
                return _costType;
            }
            set { _costType = value; }
        }
        
        
        private decimal _price;
        /// <summary>
        /// 价格
        /// </summary>
        [Column("Price")]
        public decimal Price 
        {
            get
            {
                return _price;
            }
            set { _price = value; }
        }
        
        
        private string _unit;
        /// <summary>
        /// 单位
        /// </summary>
        [Column("Unit")]
        public string Unit 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_unit))
                    _unit=string.Empty;
                return _unit;
            }
            set { _unit = value; }
        }
        
        
        private bool _inStorage;
        /// <summary>
        /// 在入库单显示
        /// </summary>
        [Column("InStorage")]
        public bool InStorage 
        {
            get
            {
                return _inStorage;
            }
            set { _inStorage = value; }
        }
        
        
        private bool _outStorage;
        /// <summary>
        /// 在出库单显示
        /// </summary>
        [Column("OutStorage")]
        public bool OutStorage 
        {
            get
            {
                return _outStorage;
            }
            set { _outStorage = value; }
        }
        
        
        private bool _transferStorage;
        /// <summary>
        /// 在调仓单显示
        /// </summary>
        [Column("TransferStorage")]
        public bool TransferStorage 
        {
            get
            {
                return _transferStorage;
            }
            set { _transferStorage = value; }
        }
        
        
        private int _contractType;
        /// <summary>
        /// 合同类型（1:零仓,2:包仓）
        /// </summary>
        [Column("ContractType")]
        public int ContractType 
        {
            get
            {
                return _contractType;
            }
            set { _contractType = value; }
        }
        
        
        private bool _isDeleted;
        /// <summary>
        /// 是否删除
        /// </summary>
        [Column("IsDeleted")]
        public bool IsDeleted 
        {
            get
            {
                return _isDeleted;
            }
            set { _isDeleted = value; }
        }
        
        
        private System.DateTime _createTime;
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CreateTime")]
        public System.DateTime CreateTime 
        {
            get
            {
                if (_createTime == DateTime.MinValue)
                {
                    return DateTime.Now;//DateTime.Parse("1911-01-01");
                }
                return _createTime;
            }
            set { _createTime = value; }
        }
        
        
        private int _createUserId;
        /// <summary>
        /// 创建人id
        /// </summary>
        [Column("CreateUserId")]
        public int CreateUserId 
        {
            get
            {
                return _createUserId;
            }
            set { _createUserId = value; }
        }
        
        
        private string _createUser;
        /// <summary>
        /// 创建人
        /// </summary>
        [Column("CreateUser")]
        public string CreateUser 
        {
            get
            {
                if(string.IsNullOrWhiteSpace(_createUser))
                    _createUser=string.Empty;
                return _createUser;
            }
            set { _createUser = value; }
        }
        
        
    }
}

